import React, { useState, useReducer } from "react";
import { Card, Breadcrumb, Layout } from "antd";
import { PlusOutlined } from "@ant-design/icons";
import { getAuthList, editAuth, addAuth } from "../../api/auth/index";
import Search from "./Search";
import Table from "./Table";
import Model from "./Model";
import { UserContext, reducer, dataSource } from "./store";

const { Content } = Layout;
function NewService1() {
  const [store, dispatch] = useReducer(reducer, dataSource);

  return (
    <>
      <UserContext.Provider value={{ store, dispatch }}>
        <Card>
          <Breadcrumb separator=">">
            <Breadcrumb.Item href="/services">角色管理</Breadcrumb.Item>
            <Breadcrumb.Item href="/services/1">权限管理</Breadcrumb.Item>
          </Breadcrumb>
          <Content style={{ margin: "15px 0" }}>权限管理</Content>
		  
          <Search />
		  
          <Table />
          <Model visible={store.visible} />
        </Card>
      </UserContext.Provider>
    </>
  );
}

export default NewService1;
